package com.baizhi.Controller;

import com.baizhi.annotation.LogAnnotation;
import com.baizhi.service.MenuService;
import com.baizhi.entity.Menu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("menu")
public class MenuController {
    @Autowired
    private MenuService menuService;
    @RequestMapping("showAll")
    @LogAnnotation(value = "获取菜单",type = "select")
    public @ResponseBody List<Menu> showAll(){
        List<Menu> list=menuService.showMenuAll();
        return list;
    }
}
